#include<stdio.h>
void main(){
	int sum=0;
	int i=1;
	while(i<=1000){
		printf("%d\n",i);
		sum +=i;
		i++;
	}
	printf("%d",sum);
} 
